﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Autofac;
using My.Common.AutoMapper;
using My.Common.Configuration;
using My.Common.Error;
using My.Pattern.Factory;
using My.Pattern.Builder;
using My.Common.Helper.JqGrid;
using My.Common.EntityHelper;

namespace NCLCustomerManagement.Common.IocRegistration
{
    public class CommonModule : Module
    {
        protected override void Load(ContainerBuilder builder)
        {
            builder.RegisterType<AppConfigurationManager>().As<IConfigurationManager>();
            builder.RegisterType<AutoMapperBuilder>().As<IAutoMapperBuilder>();
            builder.RegisterType<ErrorLog>().As<IErrorLog>();
            builder.RegisterType<ErrorBuilder>().As<IErrorBuilder>();
            builder.RegisterType<ConversionHelper>().As<IConversionHelper>();
            builder.RegisterType<ModelHelper>().As<IModelHelper>();
            builder.RegisterType<SortBuilder>().As<ISortBuilder>();
            builder.RegisterType<EntityHelper>().As<IEntityHelper>();
            builder.RegisterGeneric(typeof(BuildGridDataHelper<>)).As(typeof(IBuildGridDataHelper<>));
            
        }
    }
}
